package com.sihai.ehr.service;

import com.sihai.core.Limit;
import com.sihai.core.LimitedList;
import com.sihai.core.Sorter;
import com.sihai.ehr.model.biz.Transaction;
import com.sihai.ehr.model.biz.TransactionAuditing;
import com.sihai.ehr.web.pojo.SearchFormPojo;

import java.util.List;

/**
 * author: wxn
 * since: 13-4-8 下午9:30
 * 员工异动服务
 */
public interface TransactionService {
    void save(Transaction transaction)throws Exception;

    Transaction get(Long id)throws Exception;

    boolean delete(String ids)throws Exception;

    LimitedList<Transaction> findTransaction(Limit limit, Sorter sorter)throws Exception;

    LimitedList<Transaction> findTransactionByOrganizationAndType(Long organizationId, Transaction.TransactionType type, SearchFormPojo searchFormPojo, Limit limit, Sorter sorter)throws Exception;

    /**
     * 根据员工任职编号获取员工变动信息
     * @param workId
     * @param type
     * @param searchFormPojo
     * @param limit
     * @param sorter
     * @return
     * @throws Exception
     */
    LimitedList<Transaction> findTransactionByWorkIdAndType(Long workId, Transaction.TransactionType type, SearchFormPojo searchFormPojo, Limit limit, Sorter sorter)throws Exception;

    List<List<TransactionAuditing>> findTransactionAuditing(Long transactionId)throws Exception;
    void saveTransactionAuditingProcess(Long transactionId)throws Exception;
}
